﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<WebSite.Models.BudgetDetailModel>" %>
<%@ Import Namespace="WebSite.Models" %>
<%@ Import Namespace="WebSite.App_Code" %>
<%@ Import Namespace="WebSite.App_Data" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>详细信息</title>

    <style type="text/css">
    
    * { font-size:9pt; }
        
    .DataH
    {
         background-color:#CCFFCC;
         text-align:center;
		white-space:nowrap;
    }
    
    </style>

	<script type="text/javascript">

	</script>

</head>

<body>
<center>
    <br />
    <br />
    <% if (ViewData.ContainsKey("DB.Operation.Result")) { %>
        <font style="color:Red; font-weight:bold"><%=ViewData["DB.Operation.Result"] %></font>        
    <% } %>
    
    
    <% decimal decItemTotalAmount = Model.Budget_Item.Where(o => o.ItemLevel == 1).Sum(o => o.ItemAmount); %>

    <%if (Model.Project_Category.ID == "1") { %>
    
    <table border="0" cellpadding="10" cellspacing="0" style="width:800px">
        <tr>
            <td>&nbsp;</td>
            <td align="right">
                <b style="font-size:x-large"><%=Model.Budget.Year %></b>&nbsp;</td>
            <td colspan="6" align="left">
                <b style="font-size:x-large">年度预算科研项目经费预算明细表</b>&nbsp;</td>
        </tr>
        <tr>
            <td>编制单位：&nbsp;</td>
            <td colspan="6"><%=Model.Project_Department.DepartmentName %>&nbsp;</td>
            <td style=" text-align:right; white-space:nowrap;">金额单位：元&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" style="border-top:2px solid black; border-left:2px solid black; border-right:1px solid black;">
                项目名称&nbsp;</td>
            <td colspan="7"  style="border-top:2px solid black; border-right:2px solid black">
                <%=Model.Project.ProjectName %>&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                项目代码&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Project.ProjectCode %>&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                年度进度&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.AnnualProgress %>&nbsp;</td>
            <td colspan="2" class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                经费来源&nbsp;</td>
            <td colspan="2" style="border-top:1px solid black; border-right:2px solid black">
                <%=Model.Project.FundsSources %>&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                项目周期-起&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Project.ProjectBeginTime %>&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                项目周期-止&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Project.ProjectEndTime %>&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                项目负责人&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Project_PIC.UserName %>&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                是否为软课题&nbsp;</td>
            <td style="border-top:1px solid black; border-right:2px solid black">
                <%=Model.Budget_IsSoft.Name %>&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                是否垫支&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                拟到经费总额&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                预计经费到位时间&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                预计归垫时间&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                归垫责任人&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                垫支金额&nbsp;</td>
            <td colspan="2" class="DataH" style="border-top:1px solid black; border-right:2px solid black">
                备注&nbsp;</td>
        </tr>
        <tr>
            <td style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                <%=Model.C.IsA.Name %>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.AdvencePlanAmount.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.AdvencePlanTime %>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.AdvenceReturnTime %>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget_AdvencePIC.UserName %>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.AdvenceAmount.ToString("f2") %>&nbsp;</td>
            <td colspan="2" style="border-top:1px solid black; border-right:2px solid black">
                <%=Model.Budget.AdvencetRemark %>&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                状态&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.C.AS.Name %>&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                垫支转入&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.AdvenceBalance.ToString("f2")%>&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                尚未归垫&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.C.z.ToString("f2")%>&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                归垫后余额&nbsp;</td>
            <td style="border-top:1px solid black; border-right:2px solid black">
                <%=Model.C.f.ToString("f2")%>&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                预算金额&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                标准领报&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                项目经费&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                家底弥补&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                其他收入&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                上年转入&nbsp;</td>
            <td colspan="2" class="DataH" style="border-top:1px solid black; border-right:2px solid black">
                备注&nbsp;</td>
        </tr>
        <tr>
            <td style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                <%=Model.C.S.ToString("f2") %>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.Income_StandardFunds.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.Income_ProjectFunds.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.Income_Subvention.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.Income_Other.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.Income_Balance.ToString("f2")%>&nbsp;</td>
            <td colspan="2" style="border-top:1px solid black; border-right:2px solid black">
                <%=Model.Budget.BudgetRemark %>&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                当年支出金额&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                设备费&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                材料费&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                协作费&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                业务费&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                待预算经费&nbsp;</td>
            <td colspan="2" class="DataH" style="border-top:1px solid black; border-right:2px solid black">
                备注&nbsp;</td>
        </tr>
        <tr>
            <td style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                <%=Model.Budget.BudgetPay_Amount.ToString("f2") %>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.BudgetPay_Amount_Equipment.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.BudgetPay_Amount_Material.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.BudgetPay_Amount_Coordination.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.BudgetPay_Amount_Bussiness.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.BudgetPay_Amount_Budget.ToString("f2")%>&nbsp;</td>
            <td colspan="2" style="border-top:1px solid black; border-right:2px solid black">
                <%=Model.Budget.BudgetPay_Remark %>&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                历史支出金额&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.His_Amount.ToString("f2")%>&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                备注&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.His_Remark %>&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                当年支出实际&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.ActualPay_Amount.ToString("f2") %>&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                备注&nbsp;</td>
            <td style="border-top:1px solid black; border-right:2px solid black">
                <%=Model.Budget.ActualPay_Remark %>&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                设备费&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                材料费&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                协作费&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                业务费&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                设备费&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                材料费&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                协作费&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:2px solid black">
                业务费&nbsp;</td>
        </tr>
        <tr>
            <td style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                <%=Model.Budget.His_Amount_Equipment.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.His_Amount_Material.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.His_Amount_Coordination.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.His_Amount_Bussiness.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.ActualPay_Amount_Equipment.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.ActualPay_Amount_Material.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.ActualPay_Amount_Coordination.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:2px solid black">
                <%=Model.Budget.ActualPay_Amount_Bussiness.ToString("f2")%>&nbsp;</td>
        </tr>
        <tr>
            <td colspan="8" class="DataH" style="border-top:2px solid black; border-left:2px solid black; border-right:2px solid black">
                <b>当年预算支出明显</b>&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                序号&nbsp;</td>
            <td colspan="2" class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                支出品名&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                数量&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                单价&nbsp;</td>
            <td colspan="2" class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                金额&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:2px solid black">
                备注&nbsp;</td>
        </tr>
        <% foreach (wf_BudgetItem oItem in Model.Budget_Item) { %>
            <%if (oItem.ItemLevel == 1) { %>
            <tr>
                <td class="DataH" style="border-top:1px solid black; border-right:1px solid black; border-left:2px solid black;"><b><%=oItem.ItemSN %></b>&nbsp;</td>
                <td class="DataH" colspan="2" style="border-top:1px solid black; border-right:1px solid black"><b><%=oItem.ItemName %></b>&nbsp;</td>
                <td class="DataH" style="border-top:1px solid black; border-right:1px solid black"><b><%=oItem.ItemCount %></b>&nbsp;</td>
                <td class="DataH" style="border-top:1px solid black; border-right:1px solid black"><b><%=oItem.ItemPrice.Value.ToString("f2") %></b>&nbsp;</td>
                <td class="DataH" colspan="2" style="border-top:1px solid black; border-right:1px solid black"><b><%=oItem.ItemAmount.ToString("f2") %></b>&nbsp;</td>
                <td class="DataH" style="border-top:1px solid black; border-right:2px solid black"><b><%=oItem.ItemRem %></b>&nbsp;</td>
            </tr>
            <% } else { %>
            <tr>
                <td style="border-top:1px solid black; border-right:1px solid black; border-left:2px solid black;"><%=oItem.ItemSN %>&nbsp;</td>
                <td colspan="2" style="border-top:1px solid black; border-right:1px solid black"><%=oItem.ItemName %>&nbsp;</td>
                <td style="border-top:1px solid black; border-right:1px solid black"><%=oItem.ItemCount %>&nbsp;</td>
                <td style="border-top:1px solid black; border-right:1px solid black"><%=oItem.ItemPrice.Value.ToString("f2")%>&nbsp;</td>
                <td colspan="2" style="border-top:1px solid black; border-right:1px solid black"><%=oItem.ItemAmount.ToString("f2")%>&nbsp;</td>
                <td style="border-top:1px solid black; border-right:2px solid black"><%=oItem.ItemRem %>&nbsp;</td>
            </tr>            
            <% } %>
        <% } %>
        <tr>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black; border-left:2px solid black;">&nbsp;</td>
            <td class="DataH" colspan="2" style="border-top:1px solid black; border-right:1px solid black"><b>支出合计</b>&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">&nbsp;</td>
            <td class="DataH" colspan="2" style="border-top:1px solid black; border-right:1px solid black"><%=decItemTotalAmount.ToString("f2")%>&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:2px solid black">&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black; border-left:2px solid black;">&nbsp;</td>
            <td class="DataH" colspan="2" style="border-top:1px solid black; border-right:1px solid black"><b>待预算经费</b>&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">&nbsp;</td>
            <td class="DataH" colspan="2" style="border-top:1px solid black; border-right:1px solid black"><%=(Model.Budget.BudgetAmount - decItemTotalAmount).ToString("f2")%>&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:2px solid black">&nbsp;</td>
        </tr>
        <tr>
            <td colspan="8" style="border-top:2px solid black;">&nbsp;</td>
        </tr>
    </table>
    
    <% } %>

    <%if (Model.Project_Category.ID == "2") { %>
    
    <table border="0" cellpadding="10" cellspacing="0" style="width:800px">
        <tr>
            <td>&nbsp;</td>
            <td align="right">
                <b style="font-size:x-large"><%=Model.Budget.Year %></b>&nbsp;</td>
            <td colspan="6" align="left">
                <b style="font-size:x-large">年度预算外科研项目经费预算明细表</b>&nbsp;</td>
        </tr>
        <tr>
            <td>编制单位：&nbsp;</td>
            <td colspan="6"><%=Model.Project_Department.DepartmentName %>&nbsp;</td>
            <td style=" text-align:right;white-space:nowrap;">金额单位：元&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" style="border-top:2px solid black; border-left:2px solid black; border-right:1px solid black">
                项目名称&nbsp;</td>
            <td colspan="7"  style="border-top:2px solid black; border-right:2px solid black">
                <%=Model.Project.ProjectName %>&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                项目代码&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Project.ProjectCode %>&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                年度进度&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.AnnualProgress %>&nbsp;</td>
            <td colspan="2" class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                经费来源&nbsp;</td>
            <td colspan="2" style="border-top:1px solid black; border-right:2px solid black">
                <%=Model.Project.FundsSources %>&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                项目周期-起&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Project.ProjectBeginTime %>&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                项目周期-止&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Project.ProjectEndTime %>&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                项目负责人&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Project_PIC.UserName %>&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                是否为软课题&nbsp;</td>
            <td style="border-top:1px solid black; border-right:2px solid black">
                <%=Model.Budget_IsSoft.Name %>&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                是否垫支&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                拟到经费总额&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                预计经费到位时间&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                预计归垫时间&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                归垫责任人&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                垫支金额&nbsp;</td>
            <td colspan="2" class="DataH" style="border-top:1px solid black; border-right:2px solid black">
                备注&nbsp;</td>
        </tr>
        <tr>
            <td style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                <%=Model.C.IsA.Name %>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.AdvencePlanAmount.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.AdvencePlanTime %>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.AdvenceReturnTime %>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget_AdvencePIC.UserName %>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.AdvenceAmount.ToString("f2") %>&nbsp;</td>
            <td colspan="2" style="border-top:1px solid black; border-right:2px solid black">
                <%=Model.Budget.AdvencetRemark %>&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                状态&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.C.AS.Name %>&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                垫支转入&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.AdvenceBalance.ToString("f2")%>&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                尚未归垫&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.C.z.ToString("f2")%>&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                归垫后余额&nbsp;</td>
            <td style="border-top:1px solid black; border-right:2px solid black">
                <%=Model.C.f.ToString("f2")%>&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                预算金额&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                标准领报&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                项目经费&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                家底弥补&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                其他收入&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                上年转入&nbsp;</td>
            <td colspan="2" class="DataH" style="border-top:1px solid black; border-right:2px solid black">
                备注&nbsp;</td>
        </tr>
        <tr>
            <td style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                <%=Model.C.S.ToString("f2") %>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.Income_StandardFunds.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.Income_ProjectFunds.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.Income_Subvention.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.Income_Other.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.Income_Balance.ToString("f2")%>&nbsp;</td>
            <td colspan="2" style="border-top:1px solid black; border-right:2px solid black">
                <%=Model.Budget.BudgetRemark %>&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                当年支出金额&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                设备费&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                材料费&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                协作费&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                业务费&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                分摊费用&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                待预算经费&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:2px solid black">
                上缴利润&nbsp;</td>
        </tr>
        <tr>
            <td style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                <%=Model.Budget.BudgetPay_Amount.ToString("f2") %>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.BudgetPay_Amount_Equipment.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.BudgetPay_Amount_Material.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.BudgetPay_Amount_Coordination.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.BudgetPay_Amount_Bussiness.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.BudgetPay_Amount_Charge.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.BudgetPay_Amount_Budget.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:2px solid black">
                <%=Model.Budget.BudgetPay_Amount_Profit.ToString("f2")%>&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                历年支出金额&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                设备费&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                材料费&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                协作费&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                业务费&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                分摊费用&nbsp;</td>
            <td colspan="2" class="DataH" style="border-top:1px solid black; border-right:2px solid black">
                备注&nbsp;</td>
        </tr>
        <tr>
            <td style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                <%=Model.Budget.His_Amount.ToString("f2") %>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.His_Amount_Equipment.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.His_Amount_Material.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.His_Amount_Coordination.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.His_Amount_Bussiness.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.His_Amount_Charge.ToString("f2")%>&nbsp;</td>
            <td colspan="2" style="border-top:1px solid black; border-right:2px solid black">
                <%=Model.Budget.His_Remark %>&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                当年支出金额&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                设备费&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                材料费&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                协作费&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                业务费&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                分摊费用&nbsp;</td>
            <td colspan="2" class="DataH" style="border-top:1px solid black; border-right:2px solid black">
                备注&nbsp;</td>
        </tr>
        <tr>
            <td style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                <%=Model.Budget.ActualPay_Amount.ToString("f2") %>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.ActualPay_Amount_Equipment.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.ActualPay_Amount_Material.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.ActualPay_Amount_Coordination.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.ActualPay_Amount_Bussiness.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.ActualPay_Amount_Charge.ToString("f2")%>&nbsp;</td>
            <td colspan="2" style="border-top:1px solid black; border-right:2px solid black">
                <%=Model.Budget.ActualPay_Remark %>&nbsp;</td>
        </tr>
        <tr>
            <td colspan="8" class="DataH" style="border-top:2px solid black; border-left:2px solid black; border-right:2px solid black">
                <b>当年预算支出明显</b>&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                序号&nbsp;</td>
            <td colspan="2" class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                支出品名&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                数量&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                单价&nbsp;</td>
            <td colspan="2" class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                金额&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:2px solid black">
                备注&nbsp;</td>
        </tr>
        <% foreach (wf_BudgetItem oItem in Model.Budget_Item) { %>
            <%if (oItem.ItemLevel == 1) { %>
            <tr>
                <td class="DataH" style="border-top:1px solid black; border-right:1px solid black; border-left:2px solid black;"><b><%=oItem.ItemSN %></b>&nbsp;</td>
                <td class="DataH" colspan="2" style="border-top:1px solid black; border-right:1px solid black"><b><%=oItem.ItemName %></b>&nbsp;</td>
                <td class="DataH" style="border-top:1px solid black; border-right:1px solid black"><b><%=oItem.ItemCount %></b>&nbsp;</td>
                <td class="DataH" style="border-top:1px solid black; border-right:1px solid black"><b><%=oItem.ItemPrice.Value.ToString("f2")%></b>&nbsp;</td>
                <td class="DataH" colspan="2" style="border-top:1px solid black; border-right:1px solid black"><b><%=oItem.ItemAmount.ToString("f2")%></b>&nbsp;</td>
                <td class="DataH" style="border-top:1px solid black; border-right:2px solid black"><b><%=oItem.ItemRem %></b>&nbsp;</td>
            </tr>
            <% } else { %>
            <tr>
                <td style="border-top:1px solid black; border-right:1px solid black; border-left:2px solid black;"><%=oItem.ItemSN %>&nbsp;</td>
                <td colspan="2" style="border-top:1px solid black; border-right:1px solid black"><%=oItem.ItemName %>&nbsp;</td>
                <td style="border-top:1px solid black; border-right:1px solid black"><%=oItem.ItemCount %>&nbsp;</td>
                <td style="border-top:1px solid black; border-right:1px solid black"><%=oItem.ItemPrice.Value.ToString("f2")%>&nbsp;</td>
                <td colspan="2" style="border-top:1px solid black; border-right:1px solid black"><%=oItem.ItemAmount.ToString("f2")%>&nbsp;</td>
                <td style="border-top:1px solid black; border-right:2px solid black"><%=oItem.ItemRem %>&nbsp;</td>
            </tr>            
            <% } %>
        <% } %>
        <tr>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black; border-left:2px solid black;">&nbsp;</td>
            <td class="DataH" colspan="2" style="border-top:1px solid black; border-right:1px solid black"><b>支出合计</b>&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">&nbsp;</td>
            <td class="DataH" colspan="2" style="border-top:1px solid black; border-right:1px solid black"><%=decItemTotalAmount.ToString("f2")%>&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:2px solid black">&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black; border-left:2px solid black;">&nbsp;</td>
            <td class="DataH" colspan="2" style="border-top:1px solid black; border-right:1px solid black"><b>待预算经费</b>&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">&nbsp;</td>
            <td class="DataH" colspan="2" style="border-top:1px solid black; border-right:1px solid black"><%=Model.Budget.BudgetFunds.ToString("f2")%>&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:2px solid black">&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" colspan="8" style="border-top:1px solid black; border-right:2px solid black; border-left:2px solid black;"><b>经费预算上缴利润情况</b>&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" colspan="3" style="border-top:1px solid black; border-right:1px solid black; border-left:2px solid black;"><b>上缴利润</b>&nbsp;</td>
            <td class="DataH" colspan="5" style="border-top:1px solid black; border-right:2px solid black"><%=Model.Budget.BudgetPay_Amount_Profit.ToString("f2")%>&nbsp;</td>
        </tr>
        <tr>
            <td colspan="8" style="border-top:2px solid black;">&nbsp;</td>
        </tr>
    </table>
    
    <% } %>

    <%if (Model.Project_Category.ID == "4") { %>
    
    <table border="0" cellpadding="10" cellspacing="0" style="width:800px">
        <tr>
            <td colspan="2">&nbsp;</td>
            <td align="right">
                <b style="font-size:x-large"><%=Model.Budget.Year %></b>&nbsp;</td>
            <td colspan="7" align="left">
                <b style="font-size:x-large">年度机关<%=Model.Project_Type.Name %>经费预算明细表</b>&nbsp;</td>
        </tr>
        <tr>
            <td colspan="2">编制单位：&nbsp;</td>
            <td colspan="7"><%=Model.Project_Department.DepartmentName %>&nbsp;</td>
            <td colspan="1" style=" text-align:right;white-space:nowrap;">金额单位：元&nbsp;</td>
        </tr>
        <tr>
            <td colspan="2" class="DataH" style="border-top:2px solid black; border-left:2px solid black; border-right:1px solid black">
                科目名称&nbsp;</td>
            <td colspan="4"  style="border-top:2px solid black; border-right:1px solid black">
                <%=Model.Project.ProjectName %>&nbsp;</td>
            <td colspan="2" class="DataH" style="border-top:2px solid black; border-right:1px solid black">
                科目负责人&nbsp;</td>
            <td colspan="2" style="border-top:2px solid black; border-right:2px solid black">
                <%=Model.Project_PIC.UserName %>&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                是否垫支&nbsp;</td>
            <td colspan="2" class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                拟到经费总额&nbsp;</td>
            <td colspan="2" class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                预计经费到位时间&nbsp;</td>
            <td colspan="2" class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                预计归垫时间&nbsp;</td>
            <td colspan="2" class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                归垫责任人&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:2px solid black">
                垫支金额&nbsp;</td>
        </tr>
        <tr>
            <td style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                <%=Model.C.IsA.Name %>&nbsp;</td>
            <td colspan="2" style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.AdvencePlanAmount.ToString("f2")%>&nbsp;</td>
            <td colspan="2" style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.AdvencePlanTime %>&nbsp;</td>
            <td colspan="2" style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.AdvenceReturnTime %>&nbsp;</td>
            <td colspan="2" style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget_AdvencePIC.UserName %>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:2px solid black">
                <%=Model.Budget.AdvenceAmount.ToString("f2") %>&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                状态&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.C.AS.Name %>&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                垫支转入&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.C.y.ToString("f2") %>&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                尚未归垫&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.C.z.ToString("f2") %>&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                归垫后余额&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.C.f.ToString("f2") %>&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                备注&nbsp;</td>
            <td style="border-top:1px solid black; border-right:2px solid black">
                <%=Model.Budget.AdvencetRemark %>&nbsp;</td>
        </tr>
        <tr>
            <td rowspan="2" class="DataH" style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                预算金额&nbsp;</td>
            <td rowspan="2" class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                标准领报&nbsp;</td>
            <td rowspan="2" class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                项目经费&nbsp;</td>
            <td colspan="4" class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                家底弥补&nbsp;</td>
            <td rowspan="2" class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                其他收入&nbsp;</td>
            <td rowspan="2" class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                上年转入&nbsp;</td>
            <td rowspan="2" class="DataH" style="border-top:1px solid black; border-right:2px solid black;">
                备注&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                所家底&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                科技处家底&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                政治部家底&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                管理处家底&nbsp;</td>
        </tr>
        <tr>
            <td style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                <%=Model.C.S.ToString("f2") %>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.Income_StandardFunds.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.Income_ProjectFunds.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.Income_DepartmentSubvention.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.Income_ScienceSubvention.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.Income_PoliticalSubvention.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.Income_MangerSubvention.ToString("f2")%>&nbsp;</td>            
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.Income_Other.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.Income_Balance.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:2px solid black;">
                <%=Model.Budget.BudgetRemark %>&nbsp;</td>
        </tr>
        <tr>
            <td colspan="2" class="DataH" style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                当年支出金额&nbsp;</td>
            <td colspan="2" class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                当年支出实际&nbsp;</td>
            <td colspan="2" class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                历年支出金额&nbsp;</td>
            <td colspan="4" class="DataH" style="border-top:1px solid black; border-right:2px solid black">
                备注&nbsp;</td>
        </tr>
        <tr>
            <td colspan="2" style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                <%=Model.Budget.BudgetPay_Amount.ToString("f2") %>&nbsp;</td>
            <td colspan="2" style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.ActualPay_Amount.ToString("f2")%>&nbsp;</td>
            <td colspan="2" style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.His_Amount.ToString("f2")%>&nbsp;</td>
            <td colspan="4" style="border-top:1px solid black; border-right:2px solid black">
                <%=Model.Budget.BudgetPay_Remark %>&nbsp;</td>
        </tr>
        <tr>
            <td colspan="10" class="DataH" style="border-top:2px solid black; border-left:2px solid black; border-right:2px solid black">
                <b>经费预算支出情况</b>&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                序号&nbsp;</td>
            <td colspan="3" class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                预算开支项目&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                单位&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                单价&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                数量&nbsp;</td>
            <td colspan="2" class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                预算开支金额&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:2px solid black">
                备注&nbsp;</td>
        </tr>
        <% foreach (wf_BudgetItem oItem in Model.Budget_Item) { %>
            <%if (oItem.ItemLevel == 3) { %>
            <tr>
                <td style="border-top:1px solid black; border-right:1px solid black; border-left:2px solid black;"><%=oItem.ItemSN %>&nbsp;</td>
                <td colspan="3" style="border-top:1px solid black; border-right:1px solid black"><%=oItem.ItemName %>&nbsp;</td>
                <td style="border-top:1px solid black; border-right:1px solid black"><%=oItem.ItemUnit %>&nbsp;</td>
                <td style="border-top:1px solid black; border-right:1px solid black"><%=oItem.ItemPrice.Value.ToString("f2")%>&nbsp;</td>
                <td style="border-top:1px solid black; border-right:1px solid black"><%=oItem.ItemCount %>&nbsp;</td>
                <td colspan="2" style="border-top:1px solid black; border-right:1px solid black"><%=oItem.ItemAmount.ToString("f2")%>&nbsp;</td>
                <td style="border-top:1px solid black; border-right:2px solid black"><%=oItem.ItemRem %>&nbsp;</td>
            </tr>
            <% } %>
        <% } %>
        <tr>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black; border-left:2px solid black;">&nbsp;</td>
            <td class="DataH" colspan="3" style="border-top:1px solid black; border-right:1px solid black"><b>合计</b>&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">&nbsp;</td>
            <td class="DataH" colspan="2" style="border-top:1px solid black; border-right:1px solid black"><%=decItemTotalAmount.ToString("f2")%>&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:2px solid black">&nbsp;</td>
        </tr>
        <tr>
            <td colspan="10" style="border-top:2px solid black;">&nbsp;</td>
        </tr>
    </table>
    
    <% } %>

    <%if (Model.Project_Category.ID == "3") { %>
    
    <table border="0" cellpadding="10" cellspacing="0" style="width:800px">
        <tr>
            <td>&nbsp;</td>
            <td align="right">
                <b style="font-size:x-large"><%=Model.Budget.Year %></b>&nbsp;</td>
            <td colspan="6" align="left">
                <b style="font-size:x-large">年度有偿服务项目经费预算明细表</b>&nbsp;</td>
        </tr>
        <tr>
            <td>编制单位：&nbsp;</td>
            <td colspan="6"><%=Model.Project_Department.DepartmentName %>&nbsp;</td>
            <td style=" text-align:right;white-space:nowrap;">金额单位：元&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" style="border-top:2px solid black; border-left:2px solid black; border-right:1px solid black">
                项目名称&nbsp;</td>
            <td colspan="7"  style="border-top:2px solid black; border-right:2px solid black">
                <%=Model.Project.ProjectName %>&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                项目代码&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Project.ProjectCode %>&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                年度进度&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.AnnualProgress %>&nbsp;</td>
            <td colspan="2" class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                经费来源&nbsp;</td>
            <td colspan="2" style="border-top:1px solid black; border-right:2px solid black">
                <%=Model.Project.FundsSources %>&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                项目周期-起&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Project.ProjectBeginTime %>&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                项目周期-止&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Project.ProjectEndTime %>&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                项目负责人&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Project_PIC.UserName %>&nbsp;</td>
            <td colspan="2" class="DataH" style="border-top:1px solid black; border-right:2px solid black">&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                是否垫支&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                拟到经费总额&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                预计经费到位时间&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                预计归垫时间&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                归垫责任人&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                垫支金额&nbsp;</td>
            <td colspan="2" class="DataH" style="border-top:1px solid black; border-right:2px solid black">
                备注&nbsp;</td>
        </tr>
        <tr>
            <td style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                <%=Model.C.IsA.Name %>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.AdvencePlanAmount.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.AdvencePlanTime %>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.AdvenceReturnTime %>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget_AdvencePIC.UserName %>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.AdvenceAmount.ToString("f2") %>&nbsp;</td>
            <td colspan="2" style="border-top:1px solid black; border-right:2px solid black">
                <%=Model.Budget.AdvencetRemark %>&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                状态&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.C.AS.Name %>&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                垫支转入&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.AdvenceBalance.ToString("f2")%>&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                尚未归垫&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.C.z.ToString("f2")%>&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                归垫后余额&nbsp;</td>
            <td style="border-top:1px solid black; border-right:2px solid black">
                <%=Model.C.f.ToString("f2")%>&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                预算金额&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                标准领报&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                项目经费&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                家底弥补&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                其他收入&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                上年转入&nbsp;</td>
            <td colspan="2" class="DataH" style="border-top:1px solid black; border-right:2px solid black">
                备注&nbsp;</td>
        </tr>
        <tr>
            <td style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                <%=Model.C.S.ToString("f2") %>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.Income_StandardFunds.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.Income_ProjectFunds.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.Income_Subvention.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.Income_Other.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.Income_Balance.ToString("f2")%>&nbsp;</td>
            <td colspan="2" style="border-top:1px solid black; border-right:2px solid black">
                <%=Model.Budget.BudgetRemark %>&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                当年支出金额&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                成本性&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                公用费用&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                分摊费用&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                待预算经费&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                上缴利润&nbsp;</td>
            <td colspan="2" class="DataH" style="border-top:1px solid black; border-right:2px solid black">
                备注&nbsp;</td>
        </tr>
        <tr>
            <td style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                <%=Model.Budget.BudgetPay_Amount.ToString("f2") %>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.BudgetPay_Amount_Prime.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.BudgetPay_Amount_Public.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.BudgetPay_Amount_Charge.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.BudgetPay_Amount_Budget.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.BudgetPay_Amount_Profit.ToString("f2")%>&nbsp;</td>
            <td colspan="2" style="border-top:1px solid black; border-right:2px solid black">
                <%=Model.Budget.BudgetPay_Remark %>&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                历年支出金额&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                成本性&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                公用费用&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                分摊费用&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                当年支出实际&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                成本性&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                公用费用&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:2px solid black">
                分摊费用&nbsp;</td>
        </tr>
        <tr>
            <td style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                <%=Model.Budget.His_Amount.ToString("f2") %>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.His_Amount_Prime.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.His_Amount_Public.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.His_Amount_Charge.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.ActualPay_Amount.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.ActualPay_Amount_Prime.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:1px solid black">
                <%=Model.Budget.ActualPay_Amount_Public.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:2px solid black">
                <%=Model.Budget.ActualPay_Amount_Charge.ToString("f2")%>&nbsp;</td>
        </tr>
        <tr>
            <td colspan="8" class="DataH" style="border-top:2px solid black; border-left:2px solid black; border-right:2px solid black">
                <b>当年预算支出明显</b>&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                序号&nbsp;</td>
            <td colspan="2" class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                支出品名&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                数量&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                单价&nbsp;</td>
            <td colspan="2" class="DataH" style="border-top:1px solid black; border-right:1px solid black">
                金额&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:2px solid black">
                备注&nbsp;</td>
        </tr>
        <% foreach (wf_BudgetItem oItem in Model.Budget_Item) { %>
            <%if (oItem.ItemLevel == 1) { %>
            <tr>
                <td class="DataH" style="border-top:1px solid black; border-right:1px solid black; border-left:2px solid black;"><b><%=oItem.ItemSN %></b>&nbsp;</td>
                <td class="DataH" colspan="2" style="border-top:1px solid black; border-right:1px solid black"><b><%=oItem.ItemName %></b>&nbsp;</td>
                <td class="DataH" style="border-top:1px solid black; border-right:1px solid black"><b><%=oItem.ItemCount %></b>&nbsp;</td>
                <td class="DataH" style="border-top:1px solid black; border-right:1px solid black"><b><%=oItem.ItemPrice %></b>&nbsp;</td>
                <td class="DataH" colspan="2" style="border-top:1px solid black; border-right:1px solid black"><b><%=oItem.ItemAmount %></b>&nbsp;</td>
                <td class="DataH" style="border-top:1px solid black; border-right:2px solid black"><b><%=oItem.ItemRem %></b>&nbsp;</td>
            </tr>
            <% } else { %>
            <tr>
                <td style="border-top:1px solid black; border-right:1px solid black; border-left:2px solid black;"><%=oItem.ItemSN %>&nbsp;</td>
                <td colspan="2" style="border-top:1px solid black; border-right:1px solid black"><%=oItem.ItemName %>&nbsp;</td>
                <td style="border-top:1px solid black; border-right:1px solid black"><%=oItem.ItemCount %>&nbsp;</td>
                <td style="border-top:1px solid black; border-right:1px solid black"><%=oItem.ItemPrice %>&nbsp;</td>
                <td colspan="2" style="border-top:1px solid black; border-right:1px solid black"><%=oItem.ItemAmount %>&nbsp;</td>
                <td style="border-top:1px solid black; border-right:2px solid black"><%=oItem.ItemRem %>&nbsp;</td>
            </tr>            
            <% } %>
        <% } %>
        <tr>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black; border-left:2px solid black;">&nbsp;</td>
            <td class="DataH" colspan="2" style="border-top:1px solid black; border-right:1px solid black"><b>支出合计</b>&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">&nbsp;</td>
            <td class="DataH" colspan="2" style="border-top:1px solid black; border-right:1px solid black"><%=decItemTotalAmount.ToString("f2")%>&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:2px solid black">&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black; border-left:2px solid black;">&nbsp;</td>
            <td class="DataH" colspan="2" style="border-top:1px solid black; border-right:1px solid black"><b>待预算经费</b>&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black">&nbsp;</td>
            <td class="DataH" colspan="2" style="border-top:1px solid black; border-right:1px solid black"><%=Model.Budget.BudgetFunds.ToString("f2")%>&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:2px solid black">&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" colspan="8" style="border-top:1px solid black; border-right:2px solid black; border-left:2px solid black;"><b>经费预算上缴利润情况</b>&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" colspan="3" style="border-top:1px solid black; border-right:1px solid black; border-left:2px solid black;"><b>上缴利润</b>&nbsp;</td>
            <td class="DataH" colspan="5" style="border-top:1px solid black; border-right:2px solid black"><%=Model.Budget.BudgetPay_Amount_Profit.ToString("f2")%>&nbsp;</td>
        </tr>
        <tr>
            <td colspan="8" style="border-top:2px solid black;">&nbsp;</td>
        </tr>
    </table>
    
    <% } %>

    <script type="text/javascript">

        function ExportExcel() {

            var x = window.open("../Download/QueryBudget/1");
            x.focus();
        }
        
    </script>
    <table style="display:none">
        <tr>
            <td><input type="button" value="导出"/></td>
            <% if (Model.U.AppCan(L_ActionType.Approve
                               , new list_ProjectCategory() { ID = Model.Project.ProjectCategoryID }
                               , new md_Department() { Guid = Model.Project.DepartmentGuid }
                               , new md_User() { Guid = Model.Project.ProjectPIC }
                               , new list_BudgetStatus() { Status = Model.Budget.BudgetStatus }))
               { %>
            <td>
                <input type="button" value="审核"/>
            </td>
            <%} %>

            <% if (Model.U.AppCan(L_ActionType.Paid
                               , new list_ProjectCategory() { ID = Model.Project.ProjectCategoryID }
                               , new md_Department() { Guid = Model.Project.DepartmentGuid }
                               , new md_User() { Guid = Model.Project.ProjectPIC }
                               , new list_BudgetStatus() { Status = Model.Budget.BudgetStatus }))
               { %>
            <td>
                <input type="button" value="进行支付"/>
            </td>
            <%} %>

            <% if (Model.U.AppCan(L_ActionType.Modify
                               , new list_ProjectCategory() { ID = Model.Project.ProjectCategoryID }
                               , new md_Department() { Guid = Model.Project.DepartmentGuid }
                               , new md_User() { Guid = Model.Project.ProjectPIC }
                               , new list_BudgetStatus() { Status = Model.Budget.BudgetStatus }))
               { %>
            <td>
                <input type="button" value="登记收入"/>
            </td>
            <%} %>

            <% if (Model.U.AppCan(L_ActionType.Adjust
                               , new list_ProjectCategory() { ID = Model.Project.ProjectCategoryID }
                               , new md_Department() { Guid = Model.Project.DepartmentGuid }
                               , new md_User() { Guid = Model.Project.ProjectPIC }
                               , new list_BudgetStatus() { Status = Model.Budget.BudgetStatus }))
               { %>
            <td>
                <input type="button" value="调整"/>
            </td>
            <%} %>
        </tr>
    </table>
</center>
</body>

</html>
